/**
 * Copyright (C) 2017 - 2020 https://github.com/joewee
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.model.sap;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 销售行项目折扣信息
 *
 * @author joewee
 * @version 1.0.0
 * @Date 2018/5/18 12:01
 */
@XStreamAlias("ITEM3")
public class Discount extends BaseXml implements Serializable {
    public static final String DISCTYPECODE = "ZCXS";

    /**
     * 销售行项目编号
     */
    @XStreamAlias("RETAILNUMBER")
    private Integer retailNumber;
    /**
     * 折扣项编号
     */
    @XStreamAlias("DISCNUMBER")
    private Integer discnumber;
    /**
     *
     */
    @XStreamAlias("DISCTYPECODE")
    private String discTypeCode;
    /**
     * 折扣金额
     */
    @XStreamAlias("REDUCTIONAMOUNT")
    private BigDecimal reductionAmount;
    /**
     * 富基促销单号
     */
    @XStreamAlias("DISCID")
    private String discId = "";
    /**
     * 促销时供应商分担促销折扣的比例，默认0
     */
    @XStreamAlias("BONUSBUYID")
    private String bonusBuyId = "0";

    public Discount(Integer retailNumber, Integer discnumber, String discTypeCode,
                    BigDecimal reductionAmount) {
        this.retailNumber = retailNumber;
        this.discnumber = discnumber;
        this.discTypeCode = discTypeCode;
        this.reductionAmount = reductionAmount;
    }

    public Discount(Integer retailNumber) {
        this.retailNumber = retailNumber;
        this.discnumber = retailNumber;
        this.discTypeCode = DISCTYPECODE;
        this.reductionAmount = new BigDecimal("0");
    }

    public Discount() {

    }

    public Integer getRetailNumber() {
        return retailNumber;
    }

    public void setRetailNumber(Integer retailNumber) {
        this.retailNumber = retailNumber;
    }

    public Integer getDiscnumber() {
        return discnumber;
    }

    public void setDiscnumber(Integer discnumber) {
        this.discnumber = discnumber;
    }

    public String getDiscTypeCode() {
        return discTypeCode;
    }

    public void setDiscTypeCode(String discTypeCode) {
        this.discTypeCode = discTypeCode;
    }

    public BigDecimal getReductionAmount() {
        return reductionAmount;
    }

    public void setReductionAmount(BigDecimal reductionAmount) {
        this.reductionAmount = reductionAmount;
    }

    public String getDiscId() {
        return discId;
    }

    public void setDiscId(String discId) {
        this.discId = discId;
    }

    public String getBonusBuyId() {
        return bonusBuyId;
    }

    public void setBonusBuyId(String bonusBuyId) {
        this.bonusBuyId = bonusBuyId;
    }
}
